Workflow window session hard close#2021
Merged
idimov-keeper merged 4 commits intoreleasefrom May 7, 2026
Merged
Conversation
When the workflow lease expires for `pam tunnel start` or `pam launch`,
soft-close the tube now and escalate to keeper_pam_webrtc_rs's new
force_close_tube after 3s. Force-close drops the local TCP listener and
severs in-flight forwarded TCP streams (SSH, MySQL, etc.), which the
prior soft-close did not — an active session would linger past expiry
until the user disconnected manually.
Escalation is gated on both endpoints supporting force_close_tube:
hasattr(tube_registry, "force_close_tube") on the local crate AND
remote SDP-advertised version >= FORCE_CLOSE_MIN_VERSION ("2.1.18").
Older peers fall back to soft close only.
- tunnel_helpers: add escalate_close() shared helper plus
FORCE_CLOSE_MIN_VERSION / FORCE_CLOSE_DELAY_SECONDS constants;
consolidate _version_at_least here as the single source of truth
(terminal_connection.py re-exports for back-compat with launch.py)
- tunnel_and_connections: replace the previously-commented-out soft
close in `pam tunnel start`'s lease-expiry callback with escalate_close
- pam_launch/launch: wire escalate_close into `pam launch`'s
_on_lease_expired (was only setting flags before, no tube close)
…lter for concurrent sessions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.